package com.gxuwz.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

import com.gxuwz.dao.impl.BaseDaoImpl;
import com.gxuwz.dao.impl.LaboratoryDaoImpl;
import com.gxuwz.entity.SysLaboratory;
import com.gxuwz.service.ILaboratoryService;

@Service("laboratoryService")
public class LaboratoryServiceImpl extends BaseServiceImpl<SysLaboratory> implements ILaboratoryService{

	private LaboratoryDaoImpl laboratoryDao;
	
	@Override
    @Autowired(required = true)
    @Qualifier("laboratoryDao")
	public void setBaseDao(BaseDaoImpl<SysLaboratory> baseDao) {
        this.baseDao = baseDao;
        this.laboratoryDao = (LaboratoryDaoImpl) baseDao;
	}

	@Override
	public List<SysLaboratory> findLabByDeptId(int id) {
		List<SysLaboratory> laboratorys = laboratoryDao.list(
				"from SysLaboratory WHERE dept_id = ?", id);
		return laboratorys;
	}

}
